Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to build and run UI only apps. #80

Merged
merged 9 commits into from
Mar 6, 2020
Merged

Conversation

sandeep-paliwal
Copy link
Contributor

Aio commands used to error out when UI only apps were run.
Made sure all action dependencies for their build and deploy only are called if manifest file is present.

Description

Related Issue

Motivation and Context

How Has This Been Tested?

create UI only app from CLI. Try out aio app run command.

Screenshots (if appropriate):

Types of changes

  • [x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x ] I have signed the Adobe Open Source CLA.
  • [ x] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • [x ] I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@moritzraho moritzraho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandeep-paliwal I've added a few comments 🙂

scripts/build.actions.js Outdated Show resolved Hide resolved
@@ -39,52 +39,54 @@ class DeployActions extends BaseScript {
* @memberof DeployActions
*/
async run (args = [], deployConfig = {}) {
const taskName = 'Deploy actions'
this.emit('start', taskName)
if (this.config.app.hasBackend) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -127,10 +127,10 @@ class ActionServer extends BaseScript {
if (hasFrontend) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also if not hasBackend we don't want to build & deploy actions + don't need to start the openwhisk server

Copy link
Member

@moritzraho moritzraho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandeep-paliwal almost LGTM, just let's make sure that we do not start the openwhisk server
I would replace the

if (local) {
... runs openwhisk local jar ...
}
if (backend){
...
}
if (frontend) {
...
}

with

if (backend) {
  if (local) {
    .. runs local ow ..
  }
...
}
if (frontend) {
...
}

@purplecabbage
Copy link
Member

this has failing tests, and now merge conflicts also.

@sandeep-paliwal
Copy link
Contributor Author

@purplecabbage I will update the PR

Copy link
Member

@moritzraho moritzraho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandeep-paliwal two comments on top:

  1. undeploy actions is missing the hasBackend check, so it fails with an ugly message
  2. aio app run shows ℹ using remote actions even if there are no actions

test/scripts/build.ui.test.js Show resolved Hide resolved
test/scripts/dev.test.js Outdated Show resolved Hide resolved
@sandeep-paliwal sandeep-paliwal merged commit a5056a8 into master Mar 6, 2020
@moritzraho moritzraho deleted the ui_only_apps branch March 6, 2020 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants